# Contributor: Ariadne Conill <ariadne@dereferenced.org>
# Maintainer: Ariadne Conill <ariadne@dereferenced.org>
pkgname=macifrename
pkgver=0.1.2
pkgrel=1
pkgdesc="stably rename NICs based on MAC addresses"
url="https://git.sr.ht/~kaniini/macifrename"
arch="all"
license="ISC"
makedepends="linux-headers"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~kaniini/macifrename/archive/$pkgver.tar.gz
	macifrename.initd
	macifrename.confd"
options="!check"

build() {
	make
}

package() {
	make install DESTDIR="$pkgdir"

	install -D -m755 "$srcdir"/macifrename.initd "$pkgdir"/etc/init.d/macifrename
	install -D -m644 "$srcdir"/macifrename.confd "$pkgdir"/etc/conf.d/macifrename
}

sha512sums="
661449b2018fc558e69d1ebfaf0c829e1ba21173fb0b596bc34967c8652926238258e7acba0326d374b21e7637735a381e79d2ba9a2ab67c594c077dda5a2464  macifrename-0.1.2.tar.gz
77a728bb67c8965d74aa1959628c5ed63739b3df01118a692ee9ee47256b1b9437e9f912652327fc53cf1e87f114ebb56bbcfca5eff6326608b8c14b344c7ba6  macifrename.initd
d6c28da2cd5205f4ffdf353ec88acfbb00ffbff5e984fc949b7c7e8de46ddfeba6af2c41675460599bf7fba36b661fe7b83a6e1c4bb84c0ee513410b7661c6d1  macifrename.confd
"
